-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adjusted grade field validation #382
feat: adjusted grade field validation #382
Conversation
Thanks for the pull request, @dyudyunov! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #382 +/- ##
==========================================
+ Coverage 94.98% 95.02% +0.03%
==========================================
Files 140 140
Lines 1357 1366 +9
Branches 264 269 +5
==========================================
+ Hits 1289 1298 +9
Misses 60 60
Partials 8 8 ☔ View full report in Codecov by Sentry. |
@mphilbrick211 I can take the review for this. |
@dyudyunov, do you mind adding testing instructions and screenshots to the PR description? |
Thank you, @farhaanbukhsh! |
hi @arbrandes I updated the description, please check |
In trying to reproduce this I found another bug, but yeah, this is definitely an issue. |
Here's what I'm thinking:
Is this something you have time to tackle here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above.
I lost this issue somehow. Added it to my TODO list now. I'll give updates asap |
@arbrandes could you clarify your proposals?
With current changes, the "Adjusted grade" field only allows input of numbers in a dedicated range. |
Bumping this for you, @arbrandes! |
adjustedGradeValue = 0; | ||
break; | ||
case possibleGrade && target.value > possibleGrade: | ||
adjustedGradeValue = possibleGrade; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point was that instead of artificially modifying the number the user was trying to enter, we should show an error message instead. This is so they can understand what the problem was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it
The proposal makes sense, but I can't say when I'll have time to implement it (too loaded now with other stuff)
} = useAdjustedGradeInputData(); | ||
return ( | ||
<span> | ||
<Form.Control | ||
type="text" | ||
type="number" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I tested this, I was still able to enter non-numeric characters. It could be that this is a Paragon bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange, I'm sure I tested that 🤔
I was able to use numbers, .
, and ,
only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's because of the different Paragon versions. If I remember correctly - I tested it on Quince
I believe #366 is more in line with what I'm thinking. |
Hi @dyudyunov and @arbrandes - is this still in progress? |
@dyudyunov @mphilbrick211 @arbrandes can we close this PR in favour of #366? |
no objections from my side) |
Description
Added simple validation for the "Adjusted grade" field in the "Edit Grades" popup:
Notes
This was already merged in nutmeg and maple, but the PR to the master branch wasn't open at that time.
Steps to reproduce
Behaviour before the fix
Entering the large number has no errors and it's possible to save the incorrect value:
Entering text/special symbols results in 500 errors for the request: